package cn.wawi.utils.gen;

public class GenUtil {

	/**
	 * 实体类路径,为空时不生成
	 */
	public static String modelPath="cns.wawi.entity.sys";
	/**
	 * dao路径,为空时不生成
	 */
	public static String daoPath="cns.wawi.dao.sys";
	/**
	 * mybatis路径,为空时不生成
	 */
	public static String mybatisPath="mybatis.app";
	/**
	 * 需要生成的表,为空时生成所有和除开setRemovedTableName的表
	 * tableNames不为空时，removeTableName设置无效
	 */
	public static String[] tableNames=new String[]{};
	/**
	 * 需要移除的表,如已sys_开头的
	 */
	public static String[] removeTableName=new String[]{"sys_user_role","sys_role_resource"};
	/**
	 * 需要移除的表前缀,如sys_user->user
	 */
	public static String[] removeTableNamePrefixes=new String[]{"sys_"};

	public static void main(String[] args) throws Exception {
		GenEntityUtil.me(tableNames)
		.setBasePackageName(modelPath,daoPath,mybatisPath)
		.setRemovedTableName(removeTableName)
		.setRemovedTableNamePrefixes(removeTableNamePrefixes).generate();
	}
}
